package com.hopu.mybatis_plus_demo.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_department")
public class Department {

  @TableId(type = IdType.AUTO)
  private long id;
  private String name;
  private String address;

  //在表字段中不存在
  @TableField(exist = false)
  private List<Employee> employees;
}
